package com.lrkj.lease.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lrkj.common.annotation.Excel;
import com.lrkj.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 租赁合同对象 tb_lease_contract
 *
 * @author yajun_ren
 * @date 2022-04-26
 */
@Data
public class LeaseContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id主键 */
    private String id;

    /** 小区ID */
    @Excel(name = "小区ID")
    private String communityId;

    /** 资源ID(房屋/车场/商铺/广告位) */
    @Excel(name = "资源ID(房屋/车场/商铺/广告位)")
    private String resourceId;

    /** 合同类型 */
    @Excel(name = "合同类型")
    private String contractCategoryId;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String no;

    /** 甲方(出租方)id */
    @Excel(name = "甲方(出租方)id")
    private String partyId;

    /** 甲方(出租方) */
    @Excel(name = "甲方(出租方)")
    private String partyName;

    /** 甲方联系人 */
    @Excel(name = "甲方联系人")
    private String partyContacts;

    /** 甲方手机号码 */
    @Excel(name = "甲方手机号码")
    private String partyPhone;

    /** 乙方(承租方)id */
    @Excel(name = "乙方(承租方)id")
    private String customId;

    /** 乙方(承租方) */
    @Excel(name = "乙方(承租方)")
    private String customName;

    /** 租户类型 */
    @Excel(name = "租户类型")
    private String customType;

    /** 联系人 */
    @Excel(name = "联系人")
    private String linkman;

    /** 手机号码 */
    @Excel(name = "手机号码")
    private String cellPhoneNumber;

    /** 联系地址 */
    @Excel(name = "联系地址")
    private String contactAddress;

    /** 身份证号 */
    @Excel(name = "身份证号")
    private String idCard;

    /** 合同开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date beginTime;

    /** 合同结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date finishTime;

    /** 租赁期限 */
    @Excel(name = "租赁期限")
    private String allottedTime;

    /** 签署日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签署日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signTime;

    /** 出租面积 */
    @Excel(name = "出租面积")
    private BigDecimal leaseArea;

    /** 经营业态 */
    @Excel(name = "经营业态")
    private String businessStatus;

    /** 经营品牌 */
    @Excel(name = "经营品牌")
    private String businessBrand;

    /** 品牌级别 */
    @Excel(name = "品牌级别")
    private String brandLevel;

    /** 经营范围 */
    @Excel(name = "经营范围")
    private String businessScope;

    /** 附件 */
    @Excel(name = "附件")
    private String filePath;

    /** 续租状态 */
    @Excel(name = "续租状态")
    private String reletStatus;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 经手部门ID */
    @Excel(name = "经手部门ID")
    private String createDeptId;

    /** 经手部门名称 */
    @Excel(name = "经手部门名称")
    private String createDeptName;

    //合同类型
    private String typeName;

    //房间名称
    private String roomName;

    //租户名称
    private String cusName;

    /** 收费项目 */
    @Excel(name = "收费项目")
    private String chargeId;

    /** 保证金金额 */
    @Excel(name = "保证金金额")
    private BigDecimal chargeMoneys;

    /** 收费标准 */
    @Excel(name = "收费标准")
    private String roomNormId;

    /** 费用标准 */
    @Excel(name = "费用标准")
    private BigDecimal roomNormMoney;

    /** 计费周期 */
    @Excel(name = "计费周期")
    private String chargingCycle;

    /** 生成规则 */
    @Excel(name = "生成规则")
    private String markerRule;

    /** 收费周期 */
    @Excel(name = "收费周期")
    private Long chargeNum;

    /** 收款日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date chargeTime;


    /** 确认人 */
    @Excel(name = "确认人")
    private String expiryPerson;

    /** 退租时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退租时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiryTime;

    /** 退租原因 */
    @Excel(name = "退租原因")
    private String expiryCause;

    private String partyNameType;

    /** 变更原因 */
    @Excel(name = "变更原因")
    private String leaseCause;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("communityId", getCommunityId())
            .append("resourceId", getResourceId())
            .append("contractCategoryId", getContractCategoryId())
            .append("no", getNo())
            .append("partyId", getPartyId())
            .append("partyName", getPartyName())
            .append("partyContacts", getPartyContacts())
            .append("partyPhone", getPartyPhone())
            .append("customId", getCustomId())
            .append("customName", getCustomName())
            .append("customType", getCustomType())
            .append("linkman", getLinkman())
            .append("cellPhoneNumber", getCellPhoneNumber())
            .append("contactAddress", getContactAddress())
            .append("idCard", getIdCard())
            .append("beginTime", getBeginTime())
            .append("finishTime", getFinishTime())
            .append("allottedTime", getAllottedTime())
            .append("signTime", getSignTime())
            .append("leaseArea", getLeaseArea())
            .append("businessStatus", getBusinessStatus())
            .append("businessBrand", getBusinessBrand())
            .append("brandLevel", getBrandLevel())
            .append("businessScope", getBusinessScope())
            .append("filePath", getFilePath())
            .append("reletStatus", getReletStatus())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createDeptId", getCreateDeptId())
            .append("createDeptName", getCreateDeptName())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
